fix Dependabot review request races - #275
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review✅ Merge allowed: 1 finding(s) reported but none are blocking ℹ️ Other Findings1. 🟡 [MEDIUM] Reliability in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db1c4f1213
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| gh api --method POST \ | ||
| "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/requested_reviewers" \ | ||
| -f "reviewers[]=${REVIEWER}" |
There was a problem hiding this comment.
Respect a later removal of the review request
If a maintainer removes the bot's request, requests Pigbibi, and then retracts that request while this job is running, latest_review_request_actor still returns the maintainer because it ignores the subsequent review_request_removed timeline event. This POST then recreates a review request the maintainer explicitly removed; check the current request state or account for the later removal event before restoring.
Useful? React with 👍 / 👎.
What changed
Why
This closes the remaining race between validating a bot-generated review request and deleting it. Human requests are preserved whether they happen before, during, or after the cleanup operation.
Validation